package com.cwf.common.utils.json;

import com.alibaba.fastjson2.JSON;

import java.util.List;

public class FastJson2Util {

    public static String toString (Object value){
        return JSON.toJSONString(value);
    }
    public static<T> List<T> objToList(Object value, Class<T> c){
       return JSON.parseArray(toString(value),c);
    }


    public static<T> T objToClass(Object value, Class<T> c){
        return JSON.parseObject(toString(value),c);
    }
}
